From: kfraser@localhost.localdomain Date: Mon, 23 Oct 2006 11:43:32 +0000 (+0100) Subject: [XM] Print qualified path to config file on domain creation. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15585^2~18 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/?a=commitdiff_plain;h=83217cebdf3558250d3c02893eec357fab548ccf;p=xen.git [XM] Print qualified path to config file on domain creation. From: Glauber de Oliveira Costa Signed-off-by: Keir Fraser --- diff --git a/tools/python/xen/xm/opts.py b/tools/python/xen/xm/opts.py index 189875d55e..1eac629aa1 100644 --- a/tools/python/xen/xm/opts.py +++ b/tools/python/xen/xm/opts.py @@ -488,6 +488,8 @@ class Opts: p = os.path.join(x, self.vals.defconfig) else: p = self.vals.defconfig + if not p.startswith('/'): + p = os.path.join(os.path.curdir, p) if os.path.exists(p): self.info('Using config file "%s".' % p) self.load(p, help) @@ -518,6 +520,10 @@ class Opts: exec cmd in globs, locs try: execfile(defconfig, globs, locs) + except SyntaxError,e: + raise SyntaxError, \ + "Errors were found at line %d while processing %s:\n\t%s"\ + %(e.lineno,defconfig,e.text) except: if not help: raise if help: